home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d19 / ckit15a.arc / CKIT.DOC < prev    next >
Text File  |  1990-08-13  |  102KB  |  2,707 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                         CKIT DOOR building Toolkit Library
  14.  
  15.                                    Version 1.5
  16.  
  17.  
  18.  
  19.                                  Reference Manual
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.                                   Distributed By
  30.  
  31.                           Data-Comp Information Systems
  32.                                   P.O. Box 5895
  33.                            Maryville, Tenn. 37802-5895
  34.  
  35.                            (615) 982-8723 (Hayes Ultra V.32)
  36.                            (615) 982-6537
  37.                            (615) 970-7418 (Hayes V)     (private line)
  38.  
  39.                        Copyright (c) 1990 Rickie W. Belitz
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.                                                               Introduction
  51.  
  52.                                    Introduction
  53.  
  54.        CKIT Library is an extensive library of C runtime routines that
  55.        allow easy door program implementation using PCBoard 12.0 through
  56.        14.x, GAP BBS and other doors using standard door.sys file.
  57.  
  58.        Some of CKIT Library's features include interrupt driven I/O,
  59.        16550AN UART support,provides information available from the
  60.        PCBoard .sys files, database files, multi-node support (file sharing),
  61.        local sysop function keys and many more utilities are included
  62.        for the door author.
  63.  
  64.        The CKIT Library routines are written in both assembly language
  65.        and MSC and can be used with Microsoft C, and Microsoft QuickC and
  66.        TURBO C.
  67.  
  68.        CKIT Library supports the small, and medium models.
  69.  
  70.  
  71.        Microsoft is a registered trademark, and QuickC is a trademark of
  72.        the Microsoft Corporation.
  73.  
  74.        TURBO C is a registered trademark of Borland International Inc.
  75.  
  76.        PCBoard is a registered trademark of Clark Development Company.
  77.  
  78.  
  79.                                                            Registration
  80.  
  81.        The unregistered library will display "Unregistered copy" as part of
  82.        the signoff message. The registered version eliminates this signoff
  83.        msg at the time the door is closed.  Please see the registration
  84.        information  below.  A lot of effort has gone into CKIT, to make sure
  85.        it would operate reliably and with little effort on the part of the
  86.        door author.
  87.  
  88.        CKIT is being distributed as shareware.
  89.  
  90.        The registration includes:
  91.  
  92.          ∙    A disk with the latest version of CKIT, registered to you.
  93.  
  94.          ∙    Self-Registration program for future releases of CKIT
  95.  
  96.          ∙    Technical support via electronic mail
  97.  
  98.  
  99.         For information see the addresses, phone numbers listed at the end
  100.         of this document.
  101.  
  102.  
  103.  
  104.  
  105.  
  106.                                                           Global Variables
  107.  
  108.                                  Global Variables
  109.  
  110.        The CKIT Library defines a  number of variables in the ckit.h
  111.        header  file.    Through  proper use,  these  variables  allow  the
  112.        programmer  to customize  the CKIT  Library  functions to  meet
  113.        particular application program's needs.
  114.  
  115.        DUMP_USER
  116.        -------------------------------------------------------------------
  117.        Defined As:    short DUMP_USER;
  118.  
  119.        Description:   This variable will be set if the user hangs up,
  120.                       his/her time runs out, carrier is lost, or if the
  121.                       sysop wants to return the user to the BBS system using
  122.                       function key F8.  You should check this flag in all
  123.                       major loops in the door program.
  124.  
  125.  
  126.        FORCEOFFHOOK
  127.        -------------------------------------------------------------------
  128.        Defined As:    short FORCEOFFHOOK
  129.  
  130.        Description:   This variable should be set to TRUE or FALSE in the
  131.                       CKIT.H file.  If this variable is TRUE, the modem
  132.                       will be placed OFF-HOOK if carrier is dropped in the
  133.                       door before returning to the system.  If FORCEOFFHOOK
  134.                       is false, the door will not take the modem off-hook.
  135.                       See CKIT.H
  136.  
  137.        USERFILE
  138.        -------------------------------------------------------------------
  139.        Defined As:    short USERSFILE
  140.  
  141.        Description:   This variable should be set to TRUE or FALSE in the
  142.                       CKIT.H file.  If this variable is TRUE, CKIT will
  143.                       open the Users file and those variables will be
  144.                       available.  If not, only the PCBOARD.SYS file will be
  145.                       opened and the user information will not be available.
  146.                       See CKIT.H.
  147.  
  148.        option
  149.        ------------------------------------------------------------------
  150.        Defined As:    unsigned char option;
  151.  
  152.        Description:   This variable is set to indicate how the user was
  153.                       logged off the system.  There are 5 macro's in the
  154.                       CKIT header file that describes each.
  155.  
  156.                         #define     LOGOFF      0  Normal Logoff
  157.                         #define     NOCARRIER   1  Dropped carrier*
  158.                         #define     TIMEOUT     2  Keyboard timeout*
  159.                         #define     SYSOP_O     3  Sysop request*
  160.                         #define     SYSTEMTIME  4  System time expired*
  161.  
  162.                        * These are normally handled internally by CKIT
  163.  
  164.  
  165.                                           COMPATIBILITY   Global Variables
  166.  
  167.        display                            pcboard.sys
  168.        ------------------------------------------------------------------
  169.        Defined As:    short display;
  170.  
  171.        Description:   This variable is set to indicate the status of the
  172.                       local BBS display.
  173.                       file.  TRUE/FALSE   0 = No,  1 = yes.
  174.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  175.  
  176.        printer                            pcboard.sys
  177.        ------------------------------------------------------------------
  178.        Defined As:    short printer;
  179.  
  180.        Description:   This variable is set to indicate the status of the
  181.                       BBS printer.
  182.                       TRUE/FALSE   0 = No,  1 = yes.
  183.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  184.  
  185.        pagebell                           pcboard.sys
  186.        ------------------------------------------------------------------
  187.        Defined As:    short pagebell;
  188.  
  189.        Description:   This variable is set to indicate the status of the
  190.                       BBS pagebell.
  191.                       TRUE/FALSE   0 = No,  1 = yes.
  192.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  193.  
  194.        callalarm                          pcboard.sys
  195.        ------------------------------------------------------------------
  196.        Defined As:    short callalarm;
  197.  
  198.        Description:   This variable is set to indicate the status of the
  199.                       BBS  caller alarm.
  200.                       TRUE/FALSE   0 = No,  1 = yes.
  201.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  202.  
  203.        PCB12                              pcboard.sys
  204.        ------------------------------------------------------------------
  205.        Defined As:    BYTE PCB12;
  206.  
  207.        Description:   This variable is set to indicate whether CKIT found
  208.                       a PCBoard version 12.0 pcboard.sys file or not.
  209.                       TRUE/FALSE   0 = No,  1 = yes.
  210.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  211.  
  212.        graphics                           pcboard.sys door.sys
  213.        ------------------------------------------------------------------
  214.        Defined As:    short graphics;
  215.  
  216.        Description:   This variable is set to indicate the status of the
  217.                       user graphics mode.
  218.                       TRUE/FALSE   0 = No,  1 = yes.
  219.  
  220.  
  221.        error_connection                   pcboard.sys door.sys
  222.        ------------------------------------------------------------------
  223.        Defined As:    short error_connection;
  224.  
  225.        Description:   This variable is set to indicate the status of the
  226.                       modem error_connection.
  227.                       TRUE/FALSE   0 = No,  1 = yes.
  228.  
  229.  
  230.                                           COMPATIBILITY   Global Variables
  231.  
  232.        local                              pcboard.sys door.sys
  233.        ------------------------------------------------------------------
  234.        Defined As:    short local;
  235.  
  236.        Description:   This variable is set to indicate the status of the
  237.                       local/remote operation of door.
  238.                       TRUE/FALSE   0 = No,  1 = yes.
  239.  
  240.        expert                             pcboard.sys door.sys
  241.        ------------------------------------------------------------------
  242.        Defined As:    short expert;
  243.  
  244.        Description:   This variable is set to indicate the status of the
  245.                       expert/novice mode of user.
  246.                       TRUE/FALSE   0 = No,  1 = yes.
  247.  
  248.  
  249.        event_active                       pcboard.sys
  250.        ------------------------------------------------------------------
  251.        Defined As:    short event_active;
  252.  
  253.        Description:   This variable is set to indicate the status of the
  254.                       system event.
  255.                       TRUE/FALSE   0 = No,  1 = yes.
  256.                       Useful with  14.x pcboard.sys usage only
  257.  
  258.        slide_event                        pcboard.sys
  259.        ------------------------------------------------------------------
  260.        Defined As:    short slide_event;
  261.  
  262.        Description:   This variable is set to indicate whether the system
  263.                       event can be moved or not.
  264.                       TRUE/FALSE   0 = No,  1 = yes.
  265.                       Useful with 14.x pcboard.sys useage only
  266.  
  267.        sysop_next                         pcboard.sys
  268.        ------------------------------------------------------------------
  269.        Defined As:    char  sysop_next[2];
  270.  
  271.        Description:   This C string indicates the status of the
  272.                       Sysop Next flag.  N = sysop next, X = exit to system,
  273.                       space = nothing pending.
  274.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  275.  
  276.        netchat                            pcboard.sys
  277.        ------------------------------------------------------------------
  278.        Defined As:    char  netchat[2];
  279.  
  280.        Description:   This C string indicates the status of the
  281.                       the user's netchat.  U = Unavailable,
  282.                       A = available.
  283.                       Useful with 12.0 - > 14.x pcboard.sys usage only
  284.  
  285.        aport                              pcboard.sys door.sys
  286.        ------------------------------------------------------------------
  287.        Defined As:    char  aport[2];
  288.  
  289.        Description:   This C string is an ASCII string of the com
  290.                        port in use as determined.
  291.                        See also port.
  292.  
  293.                                           COMPATIBILITY   Global Variables
  294.  
  295.        bps_open                           pcboard.sys door.sys
  296.        ------------------------------------------------------------------
  297.        Defined As:    char  bps_open[6];
  298.  
  299.        Description:   This C string is an ASCII string of the
  300.                       BBS's DTE to modem baud rate.
  301.                       Not available with PCBoard 12.0
  302.  
  303.        baud_rate                          pcboard.sys door.sys
  304.        ------------------------------------------------------------------
  305.        Defined As:    char  baud_rate[6];
  306.  
  307.        Description:   This C string is an ASCII string of the
  308.                       callers baud rate.
  309.  
  310.        firstname                          pcboard.sys door.sys
  311.        ------------------------------------------------------------------
  312.        Defined As:    char  firstname[16];
  313.  
  314.        Description:   This C string is an ASCII string of the
  315.                       caller first name.
  316.  
  317.        password                           pcboard.sys door.sys
  318.        ------------------------------------------------------------------
  319.        Defined As:    char  password[13];
  320.  
  321.        Description:   This C string is an ASCII string of the
  322.                       caller password.
  323.  
  324.        fullname                           pcboard.sys door.sys
  325.        ------------------------------------------------------------------
  326.        defined As:    char  fullname[26];
  327.  
  328.        Description:   This C string is an ASCII string of the
  329.                       caller fullname.
  330.  
  331.        page_length                        pcboard.sys and door.sys
  332.        ------------------------------------------------------------------
  333.        Defined As:    BYTE  page_length;
  334.  
  335.        Description:   Page length of user.  This information is not
  336.                       available with PCBoard 12.0 so there is a default
  337.                       of 23.  The door author can adjust as desired.
  338.                       This is also used by display_file().  Setting to
  339.                       0 equals continous. (NON-STOP).
  340.  
  341.        language                           pcboard.sys
  342.        ------------------------------------------------------------------
  343.        defined As:    char  language[5];
  344.  
  345.        Description:   This C string is an ASCII string of the
  346.                       caller language.
  347.                       Space = English
  348.  
  349.        time_logged                        pcboard.sys door.sys
  350.        ------------------------------------------------------------------
  351.        defined As:    char  time_logged[6];
  352.  
  353.        Description:   This C string is an ASCII string of the time
  354.                       caller logged onto the BBS.
  355.  
  356.  
  357.                                           COMPATIBILITY   Global Variables
  358.  
  359.        event_time                         pcboard.sys door.sys
  360.        ------------------------------------------------------------------
  361.        defined As:    char  event_time[6];
  362.  
  363.        Description:   This C string is an ASCII string of the
  364.                       system event time of the BBS as HH:MM.
  365.                       Not available with PCBoard 12.0
  366.  
  367.  
  368.        time_on                            pcboard.sys
  369.        ------------------------------------------------------------------
  370.        Defined As:    short time_on;
  371.  
  372.        Description:   This variable indicates the time in minutes
  373.                       past midnight the user logged on.
  374.  
  375.        prev_used                          pcboard.sys
  376.        ------------------------------------------------------------------
  377.        Defined As:    short prev_used;
  378.  
  379.        Description:   This variable indicates the time in minutes
  380.                       used in previous calls today.
  381.                       Not available with PCBoard 12.0
  382.  
  383.        user_record                        pcboard.sys door.sys
  384.        ------------------------------------------------------------------
  385.        Defined As:    unsigned short user_record;
  386.  
  387.        Description:   This variable holds the user record number.
  388.  
  389.        time_limit                         pcboard.sys
  390.        ------------------------------------------------------------------
  391.        Defined As:    short     time_limit;
  392.  
  393.        Description:   This variable holds the user BBS system time limit
  394.                       in minutes.
  395.  
  396.        time_added                       pcboard.sys
  397.        ------------------------------------------------------------------
  398.        Defined As:    short     time_added;
  399.  
  400.        Description:   This variable holds the Area user time added so
  401.                       far in minutes.
  402.  
  403.        min_left                         pcboard.sys door.sys
  404.        ------------------------------------------------------------------
  405.        Defined As:    short     min_left;
  406.  
  407.        Description:   This variable holds the user time left on system.
  408.  
  409.        port                             pcboard.sys door.sys
  410.        ------------------------------------------------------------------
  411.        Defined As:    short     port;
  412.  
  413.        Description:   This variable holds the com port in use.
  414.                       Equal to 0 if local mode.
  415.  
  416.  
  417.                                           COMPATIBILITY   Global Variables
  418.  
  419.        node                             pcboard.sys door.sys
  420.        ------------------------------------------------------------------
  421.        Defined As:    short     node;
  422.  
  423.        Description:   This variable holds the node in use.
  424.                       Equal to space if no network active.
  425.                       Not available in PCBoard.12.0
  426.  
  427.  
  428.        *conferences                     door.sys
  429.        ------------------------------------------------------------------
  430.        Defined As:    char *conferences
  431.  
  432.        Description:   This a pointer to a string of conferences/forums
  433.                       the user is registered in.
  434.  
  435.        parity                           door.sys
  436.        ------------------------------------------------------------------
  437.        Defined As:    short parity;
  438.  
  439.        Description:   Represent the ASCII character of parity in use.
  440.                       Note this NOT a string. It will either be ASCII
  441.                       7 (0x37) or 8 (0x38).
  442.  
  443.        current_conference;              door.sys
  444.        ------------------------------------------------------------------
  445.        Defined As:    short current_conference;
  446.  
  447.        Description:   Conference number user just exited from to door.
  448.  
  449.  
  450.        caller_bday                      door.sys
  451.        ------------------------------------------------------------------
  452.        Defined As:    char caller_bday[8];
  453.  
  454.        Description:   String containing the callers birthday.
  455.                       as MM/DD/YY.  Not available with PCBoard systems.
  456.  
  457.        main_dir                         door.sys
  458.        ------------------------------------------------------------------
  459.        Defined As:    char main_dir[15];
  460.  
  461.        Description:   String containing the path to the MAIN directory
  462.                       wherever the users file is located.
  463.  
  464.        gen_dir                          door.sys
  465.        ------------------------------------------------------------------
  466.        Defined As:    char gen_dir[15];
  467.  
  468.        Description:   String containing the path to the GEN directory.
  469.  
  470.        sysop_name                       door.sys
  471.        ------------------------------------------------------------------
  472.        Defined As:    char sysop_name[15];
  473.  
  474.        Description:   String containing the sysop's first name.
  475.  
  476.        sysop_alias                      door.sys
  477.        ------------------------------------------------------------------
  478.        Defined As:    char sysop_alias[15];
  479.  
  480.        Description:   String containing the sysop's alias name.
  481.  
  482.                                           COMPATIBILITY   Global Variables
  483.  
  484.        ansi_NG                          door.sys
  485.        ------------------------------------------------------------------
  486.        Defined As:    short ansi_NG;
  487.  
  488.        Description:   ANSI supported and caller using NG mode.
  489.                       TRUE/FALSE   0 = No,  1 = yes.
  490.  
  491.        record_lock                      door.sys
  492.        ------------------------------------------------------------------
  493.        Defined As:    short record_lock;
  494.  
  495.        Description:   User record locking.
  496.                       TRUE/FALSE   0 = No,  1 = yes.
  497.  
  498.        default_color                    door.sys
  499.        ------------------------------------------------------------------
  500.        Defined As:    char default_color[2];
  501.  
  502.        Description:   String containing system's default color
  503.  
  504.        last_file_scan                   door.sys
  505.        ------------------------------------------------------------------
  506.        Defined As:    char last_file_scan[9];
  507.  
  508.        Description:   String containing user last new files scan as
  509.                       MM/DD/YY.
  510.  
  511.        daily_files                      door.sys
  512.        ------------------------------------------------------------------
  513.        Defined As:    char daily_files[4];
  514.  
  515.        Description:   String containing number of files user has download
  516.                       so far today.
  517.  
  518.        total_doors                      door.sys
  519.        ------------------------------------------------------------------
  520.        Defined As:    char total_doors[4];
  521.  
  522.        Description:   String containing number of doors user has opened.
  523.  
  524.        msgs_left                        door.sys
  525.        ------------------------------------------------------------------
  526.        Defined As:    char msgs_left[4];
  527.  
  528.        Description:   String containing total number of messages left by
  529.                       user.
  530.  
  531.  
  532.        max_files                          door.sys
  533.        ------------------------------------------------------------------
  534.        Defined As:    char max_files[4];
  535.  
  536.        Description:   String containing Max. number of files allowed.
  537.  
  538.  
  539.        upload_Kbytes                      door.sys
  540.        ------------------------------------------------------------------
  541.        Defined As:    char upload_Kbyte[10];
  542.  
  543.        Description:   String containing total "K" bytes uploaded.
  544.  
  545.  
  546.        download_Kbytes                      door.sys
  547.        ------------------------------------------------------------------
  548.        Defined As:    char download_Kbyte[10];
  549.  
  550.        Description:   String containing total "K" bytes downloaded.
  551.  
  552.  
  553.        dload_total                           door.sys
  554.        ------------------------------------------------------------------
  555.        Defined As:    char dload_total[5];
  556.  
  557.        Description:   String containing total files downloaded.
  558.  
  559.  
  560.        upload_total                         door.sys
  561.        ------------------------------------------------------------------
  562.        Defined As:    char upload_total[5];
  563.  
  564.        Description:   String containing total files uploaded.
  565.  
  566.  
  567.  
  568.                                                           Global Variables
  569.  
  570.         These are part of the structure "user" as defined in the
  571.         CKIT.H file.  All these user structure members are available
  572.         only if the door author specifies USERFILES True (see above)
  573.         and the system is PCBoard version 14.x.  Some but not all
  574.         members are available if the author specifies USERFILE True
  575.         and used with Pcboard version 12.0.  If the door author
  576.         does not specify USERFILE's file True and the door is
  577.         using  DOOR.SYS some members of the structure are also available.
  578.         Each member is marked whether if it is available with door.sys
  579.         and/or PCBoard version 12.0.
  580.  
  581.        user.name           See also _fullname        PCBoard 12.0
  582.        ------------------------------------------------------------------
  583.        Defined As:    char    user.name[26];
  584.  
  585.        Description:   This C string is an ASCII string of the
  586.                       caller fullname as determined from user record.
  587.  
  588.        user.city                        door.sys and PCBoard 12.0
  589.        ------------------------------------------------------------------
  590.        Defined As:    char    user.city[25];
  591.  
  592.        Description:   This C string is an ASCII string of the
  593.                       caller city, state as determined from user record.
  594.  
  595.        user.pwrd                        door.sys and PCBoard 12.0
  596.        ------------------------------------------------------------------
  597.        Defined As:    char    user.pwrd[13];
  598.  
  599.        Description:   This C string is an ASCII string of the
  600.                       caller password as determined from user record.
  601.  
  602.        user.bphone                      door.sys and PCBoard 12.0
  603.        ------------------------------------------------------------------
  604.        Defined As:    char    user.bphone[14];
  605.  
  606.        Description:   This C string is an ASCII string of the caller
  607.                       business phone number as determined from user record.
  608.  
  609.        user.phone                       door.sys and PCBoard 12.0
  610.        ------------------------------------------------------------------
  611.        Defined As:    char    user.phone[14];
  612.  
  613.        Description:   This C string is an ASCII string of the caller
  614.                       home phone number as determined from user record.
  615.  
  616.        user.last_date                   door.sys and PCBoard 12.0
  617.        ------------------------------------------------------------------
  618.        Defined As:    char    user.last_date[7];
  619.  
  620.        Description:   This C string is an ASCII string of the caller
  621.                       last date on system as determined from user record.
  622.                       Format is YYMMDD
  623.  
  624.        user.last_time                   door.sys and PCBoard 12.0
  625.        ------------------------------------------------------------------
  626.        Defined As:    char    user.last_time[6];
  627.  
  628.        Description:   This C string is an ASCII string of the caller
  629.                       last time on system as determined from user record.
  630.                       Format is HH:MM
  631.  
  632.  
  633.                                                           Global Variables
  634.  
  635.         These are part of the structure "user" as defined in the
  636.         CKIT.H file.  Information available from user file.
  637.  
  638.        user.expert            See also _expert above    PCBoard 12.0
  639.        ------------------------------------------------------------------
  640.        Defined As:    char    user.expert[2];
  641.  
  642.        Description:   This C string is an ASCII string of the caller
  643.                       expert mode ( Y or N )
  644.  
  645.        user.protocol                     door.sys and PCBoard 12.0
  646.        ------------------------------------------------------------------
  647.        Defined As:    char    user.protocol[2];
  648.  
  649.        Description:   This C string is an ASCII string of the caller
  650.                       protocol type in effect.
  651.  
  652.        user.filedate                     see also _last_file_scan
  653.        ------------------------------------------------------------------
  654.        Defined As:    char    user.filedate[7];
  655.  
  656.        Description:   This C string is an ASCII string of the caller
  657.                       last DIR scan. in YYMMDD format
  658.  
  659.        user.security                     door.sys
  660.        ------------------------------------------------------------------
  661.        Defined As:    BYTE   user.security;
  662.  
  663.        Description:   This variable holds the user security level as
  664.                        determined from USER file.
  665.  
  666.        user.total_calls
  667.        ------------------------------------------------------------------
  668.        Defined As:    short     user.total_calls;
  669.  
  670.        Description:   This variable holds the user total calls on system
  671.                        determined from USER file.
  672.  
  673.        user.page_length        see also _page_length    door.sys
  674.        ------------------------------------------------------------------
  675.        Defined As:    BYTE      user.page_length;
  676.  
  677.        Description:   This variable holds the user page setting as
  678.                       determined from USER file.
  679.  
  680.        user.uploads             see also _upload_total
  681.        ------------------------------------------------------------------
  682.        Defined As:    long      user.uploads;
  683.  
  684.        Description:   This variable holds the user total uploads as
  685.                       determined from USER file.
  686.  
  687.        user.dloads               see also _dload_total
  688.        ------------------------------------------------------------------
  689.        Defined As:    long      user.dloads;
  690.  
  691.        Description:   This variable holds the user total downloads as
  692.                       determined from USER file.
  693.  
  694.  
  695.                                                           Global Variables
  696.  
  697.         These are part of the structure "user" as defined in the
  698.         CKIT.H file.  Information available from user file.
  699.  
  700.        user.comment1
  701.        ------------------------------------------------------------------
  702.        Defined As:    char    user.comment1[31];
  703.  
  704.        Description:   This C string is an ASCII string of the caller
  705.                       user maintained comment.
  706.  
  707.        user.comment2                            door.sys
  708.        ------------------------------------------------------------------
  709.        Defined As:    char    user.comment2[32];
  710.  
  711.        Description:   This C string is an ASCII string of the caller
  712.                       sysop maintained comment.
  713.  
  714.        user.expire_date                         door.sys
  715.        ------------------------------------------------------------------
  716.        Defined As:    char    user.expire_date[7];
  717.  
  718.        Description:   This C string is an ASCII string of the caller
  719.                       expiration date in YYMMDD format.
  720.  
  721.        user.delete_user
  722.        ------------------------------------------------------------------
  723.        Defined As:    char    user.delete_user[2];
  724.  
  725.        Description:   This C string is an ASCII string of delete
  726.                       user flag. (Y or N)
  727.  
  728.        user.time_used
  729.        ------------------------------------------------------------------
  730.        Defined As:    short   user.time_used;
  731.  
  732.        Description:   Elapsed time on system. (minutes)
  733.  
  734.  
  735.  
  736.                                                           Global Variables
  737.  
  738.  
  739.        char     progname[]
  740.        ------------------------------------------------------------------
  741.        Defined as:    char   prognam[21];
  742.  
  743.        Description:   Set this to your Door program name.  It will be
  744.                       display on the status line on the sysop screen.
  745.                       MAXIMUM length is 20 characters! Do not exceed this!
  746.  
  747.  
  748.        system_time_HHMMSS[]
  749.        ------------------------------------------------------------------
  750.        Defined as:    char    system_time_HHMMSS[9];
  751.  
  752.        Description:   This string will contain the current system time
  753.                       in the form HH:MM:SS and is available for general use.
  754.  
  755.  
  756.        system_date_MMDDYY[]
  757.        ------------------------------------------------------------------
  758.        Defined as:    char    todays_date_MMDDYY[9];
  759.  
  760.        Description:   This string will contain the current system date
  761.                       in the form MM:DD:YY and is available for general use.
  762.  
  763.  
  764.        cmdline[]
  765.        ------------------------------------------------------------------
  766.        Defined as:    BYTE    cmdline[128]
  767.  
  768.        Description:   This is used by get_cmdline(), to read the user
  769.                       keyboard input to.
  770.                       Please see the CKITDEMO.C for usage.
  771.  
  772.        par[]
  773.        ------------------------------------------------------------------
  774.        Defined as:    char    par[128];
  775.  
  776.        Description:   This is used by get_nextpar(), to parse stacked
  777.                       commands to.
  778.                       Please see CKITDEMO.C for usage.
  779.  
  780.  
  781.  
  782.  
  783.                                                        Standard Data Types
  784.  
  785.                                Standard Data Types
  786.  
  787.        CKIT defines a number of useful data types.
  788.  
  789.        BYTE
  790.        -------------------------------------------------------------------
  791.        Defined As:    typedef unsigned char  BYTE;
  792.  
  793.        Description:   The  BYTE data type is useful in serial communications
  794.                       since it provides an easy way of handling 8 bit data
  795.                       from UART.
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.                                                                  Functions
  804.  
  805.                                     Functions
  806.  
  807.        The  CKIT Library contains a variety  of functions.
  808.        They are described as follows:
  809.  
  810.        Summary:       Presents  an exact syntactic  model for each  of the
  811.                       CKIT Library functions.
  812.  
  813.        Description:   Describes a function's purpose and how it is used in
  814.                       an application program.
  815.  
  816.        Return Value:  Explains  any of the  possible return values  for an
  817.                       CKIT Library function.
  818.  
  819.        See Also:      Lists any similar or related CKIT Library  function.
  820.  
  821.        Example:       Illustrates how  an CKIT Library  function could
  822.                       actually be used in an application program.
  823.  
  824.  
  825.  
  826.                                                                  Functions
  827.  
  828.        open_door
  829.        -------------------------------------------------------------------
  830.        Summary:       #include "ckit.h"
  831.                       void open_door(void);
  832.  
  833.        Description:   The open door function initializes vectors,
  834.                       reads pcboard information.
  835.                       THIS MUST BE CALLED FIRST!
  836.                       Close_door MUST be called before exiting program
  837.                       after a call to open_door.
  838.  
  839.        Return Value:  No value is returned.
  840.  
  841.        See Also:      close_door.
  842.  
  843.        Example:
  844.                       #include "ckit.h"
  845.                       main()
  846.                       {
  847.                            open_door();
  848.                       }
  849.  
  850.  
  851.                                                                  Functions
  852.  
  853.        close_door
  854.        -------------------------------------------------------------------
  855.        Summary:       #include "ckit.h"
  856.                       void close_door(void);
  857.  
  858.        Description:   The close door function resets vectors,
  859.                       closes files opened.
  860.                       THIS MUST BE CALLED LAST!
  861.                       Close_door MUST be called before exiting program
  862.                       after a call has been made to open_door.
  863.  
  864.        Return Value:  No value is returned.
  865.  
  866.        See Also:      open_door.
  867.  
  868.        Example:
  869.                       #include "ckit.h"
  870.                       main()
  871.                       {
  872.                            close_door();
  873.                       }
  874.  
  875.  
  876.                                                                  Functions
  877.  
  878.        s_puts
  879.        -------------------------------------------------------------------
  880.        Summary:       #include "ckit.h"
  881.                       void s_puts(char *);
  882.  
  883.        Description:   The s_puts function displays a single NULL termintated
  884.                       (C string) to the local and remote console. It expects
  885.                       a pointer to the string of type BYTE or char
  886.                       to be displayed.
  887.  
  888.        Return Value:  No value is returned.
  889.  
  890.        See Also:      s_putv, s_putc, s_putsn, s_putstd
  891.  
  892.        Example:       Two examples, both different useage of the string pointer.
  893.                       #include "ckit.h"
  894.                       main()
  895.                       {
  896.                         static BYTE string[] = "This is a test";
  897.                         s_puts(string);
  898.                         s_puts("This is also a test");
  899.                       }
  900.  
  901.  
  902.                                                                 Functions
  903.  
  904.        s_putstd
  905.        -------------------------------------------------------------------
  906.        Summary:       #include "ckit.h"
  907.                       void s_putstd(char *);
  908.  
  909.        Description:   The s_putstd function displays a single NULL termintated
  910.                       (C string) to the local and remote console. It expects
  911.                       a pointer to the string of type BYTE or char
  912.                       to be displayed. This function is identical to s_puts
  913.                       except it uses std output.
  914.  
  915.        Return Value:  No value is returned.
  916.  
  917.        See Also:      s_putv, s_putc, s_putsn
  918.  
  919.        Example:       Two examples, both different useage of the string pointer.
  920.                       #include "ckit.h"
  921.                       main()
  922.                       {
  923.                         static BYTE string[] = "This is a test";
  924.                         s_puts(string);
  925.                         s_puts("This is also a test");
  926.                       }
  927.  
  928.  
  929.                                                                  Functions
  930.  
  931.        s_putv
  932.        -------------------------------------------------------------------
  933.        Summary:       #include "ckit.h"
  934.                       void s_putv();
  935.  
  936.        Description:   The s_putv function displays a single NULL terminated
  937.                       (C string) to the local and remote console. It expects
  938.                       a variable argument of pointer(s) to the string(s)
  939.                       of type BYTE or char to be displayed.  The list of
  940.                       pointers MUST end with a NULL pointer!.
  941.  
  942.        Return Value:  No value is returned.
  943.  
  944.        See Also:      s_puts, s_putc, s_putsn
  945.  
  946.        Example:       This example prints 2 strings with the pointer list
  947.                       terminated with a NULL pointer.
  948.                       #include "ckit.h"
  949.                       main()
  950.                       {
  951.                         static BYTE string[] = "This is a test";
  952.                         s_putv(string, "This is also a test", NULL);
  953.                       }
  954.  
  955.  
  956.                                                                  Functions
  957.  
  958.        s_putsn
  959.        -------------------------------------------------------------------
  960.        Summary:       #include "ckit.h"
  961.                       void s_putsn(char *);
  962.  
  963.        Description:   The s_putsn function displays a single NULL terminated
  964.                       (C string) to the local console only.       It expects
  965.                       a pointer to the string of type BYTE or char
  966.                       to be displayed.
  967.  
  968.        Return Value:  No value is returned.
  969.  
  970.        See Also:      s_putv, s_putc.
  971.  
  972.        Example:       Two examples, both different useage of the string pointer.
  973.                       #include "ckit.h"
  974.                       main()
  975.                       {
  976.                         static BYTE string[] = "This is a test";
  977.                         s_putsn(string);
  978.                         s_putsn("This is also a test");
  979.                       }
  980.  
  981.  
  982.  
  983.                                                                  Functions
  984.  
  985.        s_putc
  986.        -------------------------------------------------------------------
  987.        Summary:       #include "ckit.h"
  988.                       void s_putc(BYTE);
  989.  
  990.        Description:   The s_putc function displays a single BYTE or char
  991.                       to the local and remote console.
  992.  
  993.        Return Value:  No value is returned.
  994.  
  995.        See Also:      s_puts, s_putc.
  996.  
  997.        Example:       This example prints single BYTE (ASCII D) to local
  998.                       and remote console.
  999.                       #include "ckit.h"
  1000.                       main()
  1001.                       BYTE    byte_to_send = 'D';
  1002.                       {
  1003.                         s_putc(byte_to_send);
  1004.                       }
  1005.  
  1006.  
  1007.                                                                  Functions
  1008.  
  1009.        newline
  1010.        -------------------------------------------------------------------
  1011.        Summary:       #include "ckit.h"
  1012.                       void newline(void);
  1013.  
  1014.        Description:   The newline function sends a Carriage Return/Line Feed
  1015.                       to the local and remote console.
  1016.  
  1017.        Return Value:  No value is returned.
  1018.  
  1019.        See Also:      s_puts, s_putc.
  1020.  
  1021.        Example:       This example prints single CR/LF to local
  1022.                       and remote console.
  1023.                       #include "ckit.h"
  1024.                       main()
  1025.                       {
  1026.                         newline();
  1027.                       }
  1028.  
  1029.  
  1030.                                                                  Functions
  1031.  
  1032.        clear_row
  1033.        -------------------------------------------------------------------
  1034.        Summary:       #include "ckit.h"
  1035.                       void clear_row(short);
  1036.  
  1037.        Description:   The clear_row function clears a given row on screen
  1038.                       of the local and remote console. (row = 0 - 24).
  1039.                       Used only if caller is in GRAPHICS mode. (ANSI)
  1040.  
  1041.        Return Value:  No value is returned.
  1042.  
  1043.        See Also:      clear_eol, clr_screen.
  1044.  
  1045.        Example:       This example clears single row on screen of local
  1046.                       and remote console.
  1047.                       #include "ckit.h"
  1048.                       main()
  1049.                       short     row = 10;
  1050.                       {
  1051.                         clear_row(row);
  1052.                       }
  1053.  
  1054.  
  1055.                                                                  Functions
  1056.  
  1057.        clear_eol
  1058.        -------------------------------------------------------------------
  1059.        Summary:       #include "ckit.h"
  1060.                       void clear_eol(void);
  1061.  
  1062.        Description:   The clear_eol function clears to the end of line
  1063.                       from current cursor position.
  1064.                       Used only if caller is in GRAPHICS mode. (ANSI)
  1065.  
  1066.        Return Value:  No value is returned.
  1067.  
  1068.        See Also:      clear_eol, clr_screen.
  1069.  
  1070.        Example:       This example clears to end of line on screen of
  1071.                       local and remote console.
  1072.                       #include "ckit.h"
  1073.                       main()
  1074.                       {
  1075.                         clear_eol();
  1076.                       }
  1077.  
  1078.                                                                  Functions
  1079.  
  1080.        clr_screen
  1081.        -------------------------------------------------------------------
  1082.        Summary:       #include "ckit.h"
  1083.                       void clr_screen(void);
  1084.  
  1085.        Description:   The clr_screen function clears entire screen of local
  1086.                        and remote console.
  1087.  
  1088.        Return Value:  No value is returned.
  1089.  
  1090.        See Also:      clear_screen.
  1091.  
  1092.        Example:       This example clears screen of local/remote console.
  1093.                       #include "ckit.h"
  1094.                       main()
  1095.                       {
  1096.                         clr_screen();
  1097.                       }
  1098.  
  1099.  
  1100.                                                                  Functions
  1101.  
  1102.        clear_screen
  1103.        -------------------------------------------------------------------
  1104.        Summary:       #include "ckit.h"
  1105.                       void clear_screen(void);
  1106.  
  1107.        Description:   The clear_screen function clears entire screen of
  1108.                       local console including status line.
  1109.  
  1110.        Return Value:  No value is returned.
  1111.  
  1112.        See Also:      clr_screen.
  1113.  
  1114.        Example:       This example clears screen of local console.
  1115.                       #include "ckit.h"
  1116.                       main()
  1117.                       {
  1118.                         clear_screen();
  1119.                       }
  1120.  
  1121.  
  1122.                                                                  Functions
  1123.  
  1124.        pos_cursor
  1125.        -------------------------------------------------------------------
  1126.        Summary:       #include "ckit.h"
  1127.                       void pos_cursor(short, short);
  1128.  
  1129.        Description:   The pos_cursor function positions cursor at
  1130.                       row, column using ANSI (caller must be in GRAPHICS,
  1131.                       if not no action will take place)
  1132.                       row = 1 to 25, column = 1 to 80.
  1133.  
  1134.        Return Value:  No value is returned.
  1135.  
  1136.        Example:       This example positions cursor at row 10, column 15
  1137.                       on the local/remote consoles.
  1138.                       #include "ckit.h"
  1139.                       short     row = 10;
  1140.                       short     column = 15;
  1141.                       main()
  1142.                       {
  1143.                         pos_cursor(row, column);
  1144.                       }
  1145.  
  1146.                                                                  Functions
  1147.  
  1148.        set_r_c
  1149.        -------------------------------------------------------------------
  1150.        Summary:       #include "ckit.h"
  1151.                       void set_r_c(short, short);
  1152.  
  1153.        Description:   The set_r_c function positions cursor at
  1154.                       row, column BIOS on the local screen.
  1155.                       row = 1 to 25, column = 1 to 80.
  1156.  
  1157.        Return Value:  No value is returned.
  1158.  
  1159.        Example:       This example positions cursor at row 10, column 15
  1160.                       on the local/remote consoles.
  1161.                       #include "ckit.h"
  1162.                       short     row = 10;
  1163.                       short     column = 15;
  1164.                       main()
  1165.                       {
  1166.                         set_r_c(row, column);
  1167.                       }
  1168.  
  1169.                                                                  Functions
  1170.  
  1171.        back_space
  1172.        -------------------------------------------------------------------
  1173.        Summary:       #include "ckit.h"
  1174.                       void back_space(short);
  1175.  
  1176.        Description:   The back_space function backspaces cursor short number
  1177.                       of spaces or to the 1st char in row, whichever is 1st.
  1178.  
  1179.        Return Value:  No value is returned.
  1180.  
  1181.        Example:       This example backspaces cursor 5 places on the
  1182.                       local/remote consoles.
  1183.                 #include "ckit.h"
  1184.  
  1185.                 main {
  1186.                         open_door();
  1187.                         .
  1188.                         .
  1189.                         .
  1190.                         back_space(bspace);
  1191.                         .
  1192.                         .
  1193.                         .
  1194.                         close_door();
  1195.                      }
  1196.  
  1197.  
  1198.                                                                  Functions
  1199.  
  1200.        color
  1201.        -------------------------------------------------------------------
  1202.        Summary:       #include "ckit.h"
  1203.                       void color(short);
  1204.  
  1205.        Description:   The color function selects color to use using ANSI.
  1206.                       Caller must be in graphics mode.  If not, no action
  1207.                       is taken.
  1208.  
  1209.        Return Value:  No value is returned.
  1210.  
  1211.        See Also:      Color macros above in macro section used with CKIT
  1212.  
  1213.        Example:       This example sets color to red (see color macros
  1214.                       above) on the local/remote consoles.
  1215.                       #include "ckit.h"
  1216.                 #include "ckit.h"
  1217.  
  1218.                 main {
  1219.                         open_door();
  1220.                         .
  1221.                         .
  1222.                         .
  1223.                         color(red);
  1224.                         .
  1225.                         .
  1226.                         .
  1227.                         close_door();
  1228.                      }
  1229.  
  1230.  
  1231.                                                                  Functions
  1232.  
  1233.        input
  1234.        -------------------------------------------------------------------
  1235.        Summary:       #include "ckit.h"
  1236.                       void input(BYTE *, short);
  1237.  
  1238.        Description:   Read a line of input with specified length. Echo to
  1239.                       screen, leave cursor after the last key typed before
  1240.                       C/R. Automatically checks for time_left, carrier.
  1241.                       Expects a char array pointer to store input and max.
  1242.                       length of input to read.  NOTE: Each call to input()
  1243.                       will purge the buffer in use to NULLS.
  1244.  
  1245.        Return Value:  No value is returned.
  1246.  
  1247.        See Also:      inkey, getkey, sio_getbyte.
  1248.  
  1249.        Example:       This example reads keyboard input from local/remote
  1250.                       console into array usr_input[] with max. bytes to
  1251.                       read equal to 100 bytes.
  1252.  
  1253.                 #include "ckit.h"
  1254.                 BYTE      usr_input[128];
  1255.                 short     max_bytes = 100;
  1256.  
  1257.                 main {
  1258.  
  1259.                         open_door();
  1260.                         .
  1261.                         .
  1262.                         .
  1263.                         input(&usr_input[0], max_bytes);
  1264.                         .
  1265.                         .
  1266.                         .
  1267.                         close_door();
  1268.                      }
  1269.  
  1270.  
  1271.  
  1272.  
  1273.                                                                  Functions
  1274.  
  1275.        get_cmdline
  1276.        -------------------------------------------------------------------
  1277.        Summary:       #include "ckit.h"
  1278.                       void get_cmdline(void);
  1279.  
  1280.        Description:   Calls input() and reads into array cmdline*,
  1281.                       automatically maps input to Uppercase.
  1282.                       *defined in CKIT.H
  1283.  
  1284.        Return Value:  No value is returned.
  1285.  
  1286.        See Also:      input, get_nextpar.
  1287.  
  1288.        Example:       This example reads keyboard  from local/remote
  1289.                       console into array get_cmdline[]
  1290.                 #include "ckit.h"
  1291.  
  1292.                 main {
  1293.  
  1294.                         open_door();
  1295.                         .
  1296.                         .
  1297.                         .
  1298.                         s_puts("Input file_name to view: ");
  1299.                         get_cmdline();
  1300.                         .
  1301.                         .
  1302.                         .
  1303.                         close_door();
  1304.                      }
  1305.  
  1306.  
  1307.                                                                  Functions
  1308.  
  1309.        get_cmdline_raw
  1310.        -------------------------------------------------------------------
  1311.        Summary:       #include "ckit.h"
  1312.                       void get_cmdline_raw(short);
  1313.  
  1314.        Description:   Same is get_cmdline() above but erases prompt of
  1315.                       prelength.
  1316.  
  1317.  
  1318.        Return Value:  No value is returned.
  1319.  
  1320.        See Also:      input, get_nextpar, get_cmdline.
  1321.  
  1322.        Example:       This example reads keyboard  from local/remote
  1323.                       console into array cmdline[]
  1324.  
  1325.                 #include "ckit.h"
  1326.  
  1327.                 main {
  1328.  
  1329.                         open_door();
  1330.                         .
  1331.                         .
  1332.                         .
  1333.                         s_puts("Input file_name to view: ");
  1334.                         get_cmdline_raw(prelength);
  1335.                         .
  1336.                         .
  1337.                         .
  1338.                         close_door();
  1339.                      }
  1340.  
  1341.  
  1342.  
  1343.                                                                  Functions
  1344.  
  1345.        get_nextpar
  1346.        -------------------------------------------------------------------
  1347.        Summary:       #include "ckit.h"
  1348.                       char get_nextpar(void);
  1349.  
  1350.        Description:   Scans next from cmdline[] array into "par[]".
  1351.                        par defined in CKIT.H
  1352.  
  1353.        Return Value:  Returns 0 if none available, non-zero if cmd available
  1354.  
  1355.        See Also:      input, get_cmdline, cmdline and par in GLOBAL section.
  1356.  
  1357.        Example:       This example reads keyboard  from local/remote
  1358.                       console into array get_cmdline[], then calls
  1359.                       get_nextpar to scan for cmds entered.
  1360.                       #include "ckit.h"
  1361.      main() {
  1362.         do {
  1363.             get_cmdline();     /* read input into 'cmdline'  */
  1364.         } while( (DUMP_USER != TRUE) && ( strlen(cmdline) == 0 ));
  1365.         if (get_nextpar()) {  /* scan next parameter from cmdline into par */
  1366.       /* process commands */
  1367.             switch ( par[0] ) {
  1368.                 case 'A':
  1369.                 ansi_demo();
  1370.                 break;
  1371.                 default:
  1372.                 break;
  1373.             }
  1374.         }
  1375.     }
  1376.  
  1377.  
  1378.                                                                  Functions
  1379.  
  1380.        nomore
  1381.        -------------------------------------------------------------------
  1382.        Summary:       #include "ckit.h"
  1383.                       short nomore(void);
  1384.  
  1385.        Description:   Displays prompt
  1386.                       "More: (Enter) or (Y)es, (N)o, (NS)nonstop? ".
  1387.                        Returns 0 = Non_stop
  1388.                                1 = Yes
  1389.                                2 = No
  1390.  
  1391.                        Also checks for CTRL K.
  1392.  
  1393.        Return Value: short value, meaning described above/
  1394.  
  1395.        See Also:      get_def, get_defyn, get_defen
  1396.  
  1397.        Example:       This example checks for A at the keyboard,
  1398.                       from local/remote console, returns TRUE or FALSE
  1399.                 #include "ckit.h"
  1400.  
  1401.  
  1402.                                                                  Functions
  1403.  
  1404.        getdefyn
  1405.        -------------------------------------------------------------------
  1406.        Summary:       #include "ckit.h"
  1407.                       void get_defyn(char *, short)
  1408.  
  1409.        Description:   Displays prompt string and either
  1410.                       "Enter=yes " or "Enter=no" based on short value.
  1411.                       If short is Non_zero it will display "Enter=Yes".
  1412.                       If short is Zero (NULL) it will display "Enter=No".
  1413.                       Calls get_cmdline for user input.
  1414.  
  1415.        Return Value:  None
  1416.  
  1417.        See Also:      cmd_line, get_def, get_defyn, get_defen
  1418.  
  1419.  
  1420.                                                                  Functions
  1421.  
  1422.        getdefen
  1423.        -------------------------------------------------------------------
  1424.        Summary:       #include "ckit.h"
  1425.                       void get_defyn(char *, short)
  1426.  
  1427.        Description:   Same as get_defyn except default will always be
  1428.                       "Enter=none? ".
  1429.                       Calls get_cmdline for user input.
  1430.  
  1431.        Return Value:  None
  1432.  
  1433.        See Also:      cmd_line, get_def, get_defyn, get_defen
  1434.  
  1435.  
  1436.                                                                  Functions
  1437.  
  1438.        getdef
  1439.        -------------------------------------------------------------------
  1440.        Summary:       #include "ckit.h"
  1441.                       void   get_def(char *, char *)
  1442.  
  1443.        Description:   Same as get_defen except default prompt is user
  1444.                       defineable
  1445.                       Calls get_cmdline for user input.
  1446.  
  1447.  
  1448.        Return Value:  None
  1449.  
  1450.        See Also:      cmd_line, get_def, get_defyn, get_defen
  1451.  
  1452.        Example:      get_def("Enter filename: ", "Enter = quit)";
  1453.  
  1454.                                                                  Functions
  1455.  
  1456.        prompt_def
  1457.        -------------------------------------------------------------------
  1458.        Summary:       #include "ckit.h"
  1459.                       void prompt_def(char *, char *def)
  1460.  
  1461.        Description:   Same as get_def except it does not call
  1462.                       get_cmdline.
  1463.  
  1464.        Return Value:  None
  1465.  
  1466.        See Also:      cmd_line, get_def, get_defyn, get_defen
  1467.  
  1468.        Example:      prompt_def("Enter filename: ", "Enter = quit)";
  1469.  
  1470.                                                                  Functions
  1471.  
  1472.        getdefn
  1473.        -------------------------------------------------------------------
  1474.        Summary:       #include "ckit.h"
  1475.                       void   get_defn(char *, char *)
  1476.  
  1477.        Description:   Same as get_def except appends "Enter=none" to end.
  1478.                       Calls get_cmdline for user input.
  1479.  
  1480.        Return Value:  None
  1481.  
  1482.        See Also:      cmd_line, get_def, get_defyn, get_defen
  1483.  
  1484.  
  1485.                                                                  Functions
  1486.  
  1487.        inkey
  1488.        -------------------------------------------------------------------
  1489.        Summary:       #include "ckit.h"
  1490.                       size_t inkey(void);
  1491.  
  1492.        Description:   Read character (if available) from local/remote
  1493.                       console.  Does not wait for input.  Also sets
  1494.                       key_source equal to SYSOP or USER_KEY
  1495.  
  1496.        Return Value:  Returns 0 if none available, otherwise returns key
  1497.                       pressed
  1498.  
  1499.        See Also:      input, sio_getbyte, key_source above in globals,
  1500.  
  1501.        Example:       This example checks for A at the keyboard,
  1502.                       from local/remote console, returns TRUE or FALSE
  1503.                 #include "ckit.h"
  1504.  
  1505.                 main {
  1506.  
  1507.                         open_door();
  1508.                         .
  1509.                         .
  1510.                         .
  1511.                         if ( inkey() != 'A') {
  1512.                            return(FALSE);
  1513.                         } else {
  1514.                            return(TRUE);
  1515.                         }
  1516.                         .
  1517.                         .
  1518.                         .
  1519.                         close_door();
  1520.                      }
  1521.  
  1522.  
  1523.                                                                  Functions
  1524.  
  1525.        keystat
  1526.        -------------------------------------------------------------------
  1527.        Summary:       #include "ckit.h"
  1528.                       short keystat(void);
  1529.  
  1530.        Description:   Check if character is available from local console.
  1531.                       Does not wait for input.
  1532.  
  1533.        Return Value:  Returns 0 if none available. None zero if true.
  1534.  
  1535.        See Also:      input, r_count, key_source above in globals,
  1536.  
  1537.        Example:       This example checks for keypress at the keyboard
  1538.                       local console, returns TRUE or FALSE
  1539.                 #include "ckit.h"
  1540.  
  1541.                 main {
  1542.  
  1543.                         open_door();
  1544.                         .
  1545.                         .
  1546.                         .
  1547.                         if ( keystat() ) {
  1548.                            return(FALSE);
  1549.                         } else {
  1550.                            return(TRUE);
  1551.                         }
  1552.                         .
  1553.                         .
  1554.                         .
  1555.                         close_door();
  1556.                      }
  1557.  
  1558.  
  1559.  
  1560.                                                                  Functions
  1561.  
  1562.        r_count
  1563.        -------------------------------------------------------------------
  1564.        Summary:       #include "ckit.h"
  1565.                       short r_count(void);
  1566.  
  1567.        Description:   Check if character is available from remote console.
  1568.                       Does not wait for input.
  1569.  
  1570.        Return Value:  Returns FALSE if none available. Zero if true.
  1571.  
  1572.        See Also:      input, r_count, keystat.
  1573.  
  1574.        Example:       See flush_rqueue below
  1575.  
  1576.  
  1577.  
  1578.                                                                  Functions
  1579.  
  1580.        getkey
  1581.        -------------------------------------------------------------------
  1582.        Summary:       #include "ckit.h"
  1583.                       size_t getkey(void);
  1584.  
  1585.        Description:   Read character (if available)  from local console.
  1586.                       Does not wait for input.
  1587.  
  1588.        Return Value:  Returns FALSE if none available. Zero if true.
  1589.  
  1590.        See Also:      input, getkey, keystat.
  1591.  
  1592.        Example:       This example read key from local console buffer.
  1593.                       #include "ckit.h"
  1594.                       size_t ch;
  1595.                       ch = getkey();
  1596.  
  1597.  
  1598.                                                                  Functions
  1599.  
  1600.        sio_getbyte
  1601.        -------------------------------------------------------------------
  1602.        Summary:       #include "ckit.h"
  1603.                       BYTE sio_getbyte(void);
  1604.  
  1605.        Description:   Read character (if available)  from local console.
  1606.                       Does not wait for input.
  1607.  
  1608.        Return Value:  Returns FALSE if none available. Zero if true.
  1609.  
  1610.        See Also:      input, sio_getbyte, keystat.
  1611.  
  1612.        Example:       This example read byte from remote console buffer.
  1613.                       #include "ckit.h
  1614.                       BYTE ch;
  1615.                       ch = sio_getbyte();
  1616.  
  1617.  
  1618.  
  1619.                                                                  Functions
  1620.  
  1621.        force_enter
  1622.        -------------------------------------------------------------------
  1623.        Summary:       #include "ckit.h"
  1624.                       void force_enter(void);
  1625.  
  1626.        Description:   Prompts " Press Enter to continue: ", wait for C/R,
  1627.                       automatic carrier, time_left and sysop checks.
  1628.  
  1629.        Return Value:  NONE
  1630.  
  1631.        Example:       This example displays a string then prompts and
  1632.                       forces user to press C/R to continue.
  1633.                 #include "ckit.h"
  1634.  
  1635.                 main {
  1636.                         short   filehandle;
  1637.                         open_door();
  1638.                         .
  1639.                         .
  1640.                         .
  1641.                         color(yellow);
  1642.                         s_puts("Display this string\r\n");
  1643.                         force_enter();
  1644.                         .
  1645.                         .
  1646.                         .
  1647.                         close_door();
  1648.                      }
  1649.  
  1650.  
  1651.                                                                  Functions
  1652.  
  1653.        display_file
  1654.        -------------------------------------------------------------------
  1655.        Summary:       #include "ckit.h"
  1656.                       short display_file(char *);
  1657.  
  1658.        Description:   Displays file to local/remote consoles.  Automatic
  1659.                       use of page_length, control K checks, MORE? prompting,
  1660.                       closes file when done. Expects a pointer to name/path
  1661.                       of file to display.  If page_length is 0, the
  1662.                       MORE? prompting will be disabled.  You can use this
  1663.                       to your advantage for files that you do not want
  1664.                       MORE? prompting by setting user.page_length to 0 before
  1665.                       calling display_file().  Just make sure you save the
  1666.                       original value of user.page_length if you need it later
  1667.                       on. This function will not automatically attempt to
  1668.                       display a graphic file if the user is in graphics.
  1669.                       It is up to the door author to decide how he wants
  1670.                       to handle it. see below.
  1671.  
  1672.        Return Value:  Returns  non-zero if error.  If desired, you can then
  1673.                       check the C global _errno for the cause of the problem.
  1674.  
  1675.        See Also:      NONE
  1676.  
  1677.        Example:       This example displays the file ckit.m, then forces
  1678.                       user to press enter when done.
  1679.  
  1680.                 #include "ckit.h"
  1681.                 char filename[13];
  1682.                 main {
  1683.                         short   filehandle;
  1684.                         open_door();
  1685.                         .
  1686.                         .
  1687.                         .
  1688.                         strcpy(filename, "ckit.m")
  1689.                         if(!graphics) {
  1690.                             (display_file(filename);
  1691.                          } else {
  1692.                              strcat(filename,"g");
  1693.                             (display_file(filename);
  1694.                          }
  1695.                         force_enter();
  1696.                         .
  1697.                         .
  1698.                         .
  1699.                         close_door();
  1700.                      }
  1701.  
  1702.                                                                  Functions
  1703.  
  1704.        get_time
  1705.        -------------------------------------------------------------------
  1706.        Summary:       #include "ckit.h"
  1707.                       size_t get_time(void);
  1708.  
  1709.        Description:   Returns number of seconds past midnight.
  1710.  
  1711.        Return Value:  seconds
  1712.  
  1713.        See Also:      display_time, check_time_left.
  1714.  
  1715.        Example:       Set secs_past_mid using get_time();
  1716.  
  1717.                 #include "ckit.h"
  1718.  
  1719.                 main {
  1720.                         open_door();
  1721.                         .
  1722.                         .
  1723.                         .
  1724.                         size_t secs_past_mid;
  1725.                         secs_past_mid = get_time();
  1726.                         .
  1727.                         .
  1728.                         .
  1729.                         close_door();
  1730.                      }
  1731.  
  1732.  
  1733.  
  1734.                                                                  Functions
  1735.  
  1736.        check_time_left
  1737.        -------------------------------------------------------------------
  1738.        Summary:       #include "ckit.h"
  1739.                       void check_time_left(void);
  1740.  
  1741.        Description:   Checks time left on system, automatically sets
  1742.                       DUMP_USER if time expired.  Should be included
  1743.                       in all major program loops.
  1744.  
  1745.        Return Value:  NONE
  1746.  
  1747.        See Also:      display_time
  1748.  
  1749.        Example:       This function is normally handled internally by CKIT.
  1750.  
  1751.  
  1752.                                                                  Functions
  1753.  
  1754.        display_time
  1755.        -------------------------------------------------------------------
  1756.        Summary:       #include "ckit.h"
  1757.                       void display_time(void);
  1758.  
  1759.        Description:   Displays (xxxx used, xxx left)
  1760.  
  1761.        Return Value:  NONE
  1762.  
  1763.        See Also:
  1764.  
  1765.        Example:   See CKITDEMO.C also
  1766.  
  1767.             newline();
  1768.             do {
  1769.                 /* display_time_left; */
  1770.                 display_time();
  1771.                 color(green);
  1772.                 s_puts("Command? ", NULL);
  1773.                 get_cmdline();     /* read input into 'cmdline'  */
  1774.                 newline();
  1775.             } while( (DUMP_USER != TRUE) && ( strlen(cmdline) == 0 ));
  1776.         }
  1777.  
  1778.  
  1779.  
  1780.  
  1781.                                                                  Functions
  1782.  
  1783.        event_minutes
  1784.        -------------------------------------------------------------------
  1785.        Summary:       #include "ckit.h"
  1786.                       short event_minutes(void);
  1787.  
  1788.        Description:   Checks minutes past midnight event is scheduled.
  1789.  
  1790.        Return Value:  Number of minutes past midnight event is scheduled
  1791.                       to run.
  1792.  
  1793.        See Also:      check_event, mins_before_event.
  1794.  
  1795.                 #include "ckit.h"
  1796.  
  1797.                 main {
  1798.                         open_door();
  1799.                         .
  1800.                         .
  1801.                         short   event_mins;
  1802.                         event_mins = event_minutes();
  1803.                         .
  1804.                         .
  1805.                         .
  1806.                         close_door();
  1807.                      }
  1808.  
  1809.  
  1810.                                                                  Functions
  1811.  
  1812.        check_event
  1813.        -------------------------------------------------------------------
  1814.        Summary:       #include "ckit.h"
  1815.                       short check_event(void);
  1816.  
  1817.        Description:   Checks if time left will conflict with event.
  1818.  
  1819.        Return Value:  0 if no conflict, otherwise it will return the new
  1820.                       minutes left before event.
  1821.  
  1822.        See Also:      event_minutes, mins_before_event.
  1823.  
  1824.  
  1825.  
  1826.                                                                  Functions
  1827.  
  1828.        mins_before_event
  1829.        -------------------------------------------------------------------
  1830.        Summary:       #include "ckit.h"
  1831.                       short mins_before_event(void);
  1832.  
  1833.        Description:   Check minutes left before event from current time.
  1834.  
  1835.        Return Value:  Minutes before event from current time.
  1836.  
  1837.        See Also:      check_event, event_minutes.
  1838.  
  1839.        Example:
  1840.                 #include "ckit.h"
  1841.  
  1842.                 main {
  1843.                         open_door();
  1844.                         .
  1845.                         .
  1846.                         short  mins_before_event;
  1847.                         mins_before_event = mins_before_event();
  1848.                         .
  1849.                         .
  1850.                         .
  1851.                         close_door();
  1852.                      }
  1853.  
  1854.  
  1855.                                                                  Functions
  1856.  
  1857.        adjust_time_allowed
  1858.        -------------------------------------------------------------------
  1859.        Summary:       #include "ckit.h"
  1860.                       void adjust_time_allowed(short);
  1861.  
  1862.        Description:   Adjust user time left on system. Automatically
  1863.                       updates PCBoard.sys to reflect change.
  1864.  
  1865.        Return Value:  NONE
  1866.  
  1867.        See Also:      
  1868.  
  1869.        Example:  For complete example see CKITDEMO.C included
  1870.  
  1871.     if (get_nextpar()) {  /* scan next parameter from cmdline into par */
  1872.         if (!strcmpi(thinking_of, par)) {
  1873.             color(green);
  1874.             s_puts("That's right!  You get a 10 minute bonus!");
  1875.             adjust_time_allowed(10);
  1876.         } else {
  1877.             color(blue);
  1878.             s_putv("Wrong! You lose 2 minutes! \
  1879.                     I was thinking of ", thinking_of,".",NULL);
  1880.             adjust_time_allowed(-2);
  1881.         }
  1882.     }
  1883. }
  1884.  
  1885.  
  1886.                                                                  Functions
  1887.  
  1888.  
  1889.        lower_dtr
  1890.        -------------------------------------------------------------------
  1891.        Summary:       #include "ckit.h"
  1892.                       void lower_dtr(void);
  1893.  
  1894.        Description:   Drops DTR on com port, causing modem to hang up.
  1895.  
  1896.        Return Value:  NONE
  1897.  
  1898.        See Also:        raise_dtr, transmit_modem, transmit_data
  1899.  
  1900.        Example:
  1901.                         see transmit_modem below
  1902.  
  1903.                                                                  Functions
  1904.  
  1905.  
  1906.        raise_dtr
  1907.        -------------------------------------------------------------------
  1908.        Summary:       #include "ckit.h"
  1909.                       void raise_dtr(void);
  1910.  
  1911.        Description:   Drops DTR on com port, causing modem to hang up.
  1912.  
  1913.        Return Value:  NONE
  1914.  
  1915.        See Also:        lower_dtr, transmit_modem, transmit_data
  1916.  
  1917.        Example:
  1918.                         see transmit_modem below
  1919.  
  1920.  
  1921.                                                                  Functions
  1922.  
  1923.  
  1924.        force_offhook
  1925.        -------------------------------------------------------------------
  1926.        Summary:       #include "ckit.h"
  1927.                       void force_offhook(void);
  1928.  
  1929.        Description:   Drops DTR on com port, causing modem to hang up,
  1930.                       tells modem to go back offhook
  1931.  
  1932.        Return Value:  NONE
  1933.  
  1934.        See Also:      
  1935.  
  1936.        Example:
  1937.  
  1938.                 #include "ckit.h"
  1939.  
  1940.                 static char message[] = "ATZ";
  1941.  
  1942.                 main {
  1943.                         open_door();
  1944.                         .
  1945.                         .
  1946.                         if(NO_CARRIER) {
  1947.                             force_offhook();
  1948.                             transmit_data(message);
  1949.                         }
  1950.                         .
  1951.                         .
  1952.                         .
  1953.                         close_door();
  1954.                      }
  1955.  
  1956.  
  1957.                                                                  Functions
  1958.  
  1959.  
  1960.        transmit_data
  1961.        -------------------------------------------------------------------
  1962.        Summary:       #include "ckit.h"
  1963.                       void transmit_data(BYTE *);
  1964.  
  1965.        Description:   Send C string to remote console.
  1966.                       No echo to local console. Expects a pointer to either
  1967.                       a NULL terminate C string of type BYTE or char.
  1968.                       Check for carrier included.
  1969.  
  1970.        Return Value:  NONE
  1971.  
  1972.        See Also: transmit_modem
  1973.  
  1974.        Example:
  1975.                 #include "ckit.h"
  1976.  
  1977.                 static char message[] = "String to send";
  1978.  
  1979.                 main {
  1980.                         open_door();
  1981.                         .
  1982.                         .
  1983.                         .
  1984.                         transmit_data(message);
  1985.                         .
  1986.                         .
  1987.                         .
  1988.                         close_door();
  1989.                      }
  1990.  
  1991.  
  1992.  
  1993.        transmit_modem
  1994.        -------------------------------------------------------------------
  1995.        Summary:       #include "ckit.h"
  1996.                       void transmit_modem(BYTE *);
  1997.  
  1998.        Description:   Send C string to modem/remote.
  1999.                       No echo to local console. Expects a pointer to either
  2000.                       a NULL terminate C string of type BYTE or char.
  2001.                       NO carrier checking is included.
  2002.  
  2003.        Return Value:  NONE
  2004.  
  2005.        See Also: transmit_data
  2006.  
  2007.        Example:
  2008.                 #include "ckit.h"
  2009.  
  2010.                 static char message[] = "ATZ";
  2011.  
  2012.                 main {
  2013.                         open_door();
  2014.                         .
  2015.                         .
  2016.                         lower_dtr();            /* Drop DTR on modem  */
  2017.                         delay(1);               /* wait a second      */
  2018.                         raise_dtr();            /* raise DTR on modem */
  2019.                         transmit_modem(message);
  2020.                         .
  2021.                         .
  2022.                         .
  2023.                         close_door();
  2024.                      }
  2025.  
  2026.                                                          Functions
  2027.  
  2028.        tqueue_len
  2029.        -------------------------------------------------------------------
  2030.        Summary:       #include "ckit.h"
  2031.                       short tqueue_len(void);
  2032.  
  2033.        Description:   Check number of bytes left in Transmit RQUEUE.
  2034.                       Normally this routine is not needed but is available
  2035.                       if needed.
  2036.  
  2037.  
  2038.        Return Value:  Bytes left in XMIT QUEUE
  2039.  
  2040.        See Also:      
  2041.  
  2042.        Example:
  2043.                 #include "ckit.h"
  2044.  
  2045.                 static char message[] = "String to send";
  2046.  
  2047.                 main {
  2048.                         open_door();
  2049.                         .
  2050.                         .
  2051.                         .
  2052.                         transmit_data(message);
  2053.                         while( !tqueue_len() );
  2054.                         .
  2055.                         .
  2056.                         .
  2057.                         close_door();
  2058.                      }
  2059.  
  2060.  
  2061.                                                                  Functions
  2062.  
  2063.        flush_RQUEUE
  2064.        -------------------------------------------------------------------
  2065.        Summary:       #include "ckit.h"
  2066.                       void flush_RQUEUE(void);
  2067.  
  2068.        Description:   Flush bytes from Receive QUEUE buffer.
  2069.  
  2070.        Return Value:  NONE
  2071.  
  2072.        See Also: r_count, tqueue_len
  2073.  
  2074.        Example:
  2075.                 #include "ckit.h"
  2076.  
  2077.                 static char message[] = "ATH1";
  2078.  
  2079.                 main {
  2080.                         open_door();
  2081.                         .
  2082.                         .
  2083.                         .
  2084.                         flush_RQUEUE();         /* flush buffer */
  2085.                         transmit_modem(message);
  2086.                         while (r_count());      /* wait for response back */
  2087.                         .
  2088.                         .
  2089.                         .
  2090.                         close_door();
  2091.                      }
  2092.  
  2093.  
  2094.                                                                  Functions
  2095.  
  2096.        check_cd
  2097.        -------------------------------------------------------------------
  2098.        Summary:       #include "ckit.h"
  2099.                       BYTE check_CD(void);
  2100.  
  2101.        Description:   Checks if carrier present. If present, returns
  2102.                       NON-zero.  Zero (NULL) means no carrier present.
  2103.  
  2104.        Return Value:  BYTE indicator of carrier present/
  2105.  
  2106.        See Also: DUMP_USER, transmit_data, transmit_modem
  2107.  
  2108.                                                                  Functions
  2109.  
  2110.        delay
  2111.        -------------------------------------------------------------------
  2112.        Summary:       #include "ckit.h"
  2113.               void delay(short);
  2114.  
  2115.        Description:   General purpose delay in milliseconds
  2116.                       Minumum of 55 ms.  (short must be >= 1)
  2117.                       This function is good only on the MSC librarys.
  2118.                       The TURBO librarys use Borland's DELAY() function.
  2119.  
  2120.        See also:      Wait
  2121.  
  2122.        Return Value:  NONE
  2123.  
  2124.  
  2125.  
  2126.  
  2127.                                                                  Functions
  2128.  
  2129.        wait
  2130.        -------------------------------------------------------------------
  2131.        Summary:       #include "ckit.h"
  2132.                       void wait(short);
  2133.  
  2134.        Description:   General purpose delay in seconds
  2135.                       Minumum of 1 sec. for now  (short must be >= 1)
  2136.                       less than one will result in 1/2 second delay.
  2137.                       Use delay above
  2138.  
  2139.  
  2140.        Return Value:  NONE
  2141.  
  2142.        See also:      Delay
  2143.  
  2144.  
  2145.  
  2146.                                                                  Functions
  2147.  
  2148.        purge_buffer
  2149.        -------------------------------------------------------------------
  2150.        Summary:       #include "ckit.h"
  2151.                       void purge_buffer(BYTE *, short);
  2152.  
  2153.        Description:   purge_buffer will purge any buffer to NULLS by
  2154.                       passing a pointer to the buffer and the size of the
  2155.                       buffer. i.e purge_buffer(buffer, 0x80).
  2156.                       This may or may not be useful but is available.
  2157.  
  2158.            NOTE: There is a seperate purge function for the serial port
  2159.            input buffer if you wish to purge it before calling input.
  2160.            See flush_RQUEUE.
  2161.  
  2162.        Return Value:  NONE
  2163.  
  2164.        See also: flush_RQUEUE
  2165.  
  2166.  
  2167.  
  2168.                                                                  Functions
  2169.  
  2170.        check_CR
  2171.        -------------------------------------------------------------------
  2172.        Summary:       #include "ckit.h"
  2173.                       void short check_CR(void);
  2174.  
  2175.        Description:   Check for a carriage return, does not wait, does
  2176.                       not display any prompts.
  2177.                       Returns TRUE or FALSE
  2178.  
  2179.        Return Value:  TRUE, FALSE
  2180.  
  2181.        See also: check_keypress(), input(), getkey()
  2182.  
  2183.  
  2184.  
  2185.                                                                  Functions
  2186.  
  2187.        check_keypress
  2188.        -------------------------------------------------------------------
  2189.        Summary:       #include "ckit.h"
  2190.                       short check_keypress(BYTE);
  2191.  
  2192.        Description:   Check for any specific ASCII character entered.
  2193.                       Does not wait for a character.
  2194.  
  2195.                         This function may or may not be useful
  2196.                         but is available if needed for a "hot_key"
  2197.                         function in a door.
  2198.  
  2199.        Return Value:  TRUE, FALSE
  2200.  
  2201.        See also: check_CR, input(), getkey()
  2202.  
  2203.  
  2204.  
  2205.                                                                  Functions
  2206.  
  2207.        dos_shell
  2208.        -------------------------------------------------------------------
  2209.        Summary:       #include "ckit.h"
  2210.                       short dos_shell(char *);
  2211.  
  2212.        Description:   Will shell to program pointed to by character string.
  2213.                       If you plan on doing any shells, you need to use this
  2214.                       function since it will disable the keyboard timer
  2215.                       while the shell is taking place and perform some other
  2216.                       clean up's upon re-entry.
  2217.  
  2218.        Return Value:  Error level return by program called. NULL = NO error
  2219.  
  2220.        See also: F5 local shell to DOS
  2221.  
  2222.        Example:
  2223.                 #include "ckit.h"
  2224.                 main {
  2225.                         open_door();
  2226.                         .
  2227.                         .
  2228.                         .
  2229.                         dos_shell("dsz sz pB4096 ckit.doc");
  2230.                         .
  2231.                         .
  2232.                         .
  2233.                         close_door();
  2234.                      }
  2235.  
  2236.  
  2237.  
  2238.                                                                  Functions
  2239.  
  2240.        debug_on
  2241.        -------------------------------------------------------------------
  2242.        Summary:       #include "ckit.h"
  2243.                       void debug_on(void);
  2244.  
  2245.        Description:   A call to this function while debugging your door
  2246.                       will disable the keyboard timer among other things
  2247.                       while you are trying to debug your door.  Make
  2248.                       sure you remove this call before releasing your door
  2249.                       or the keyboard timeout will not function!  It should
  2250.                       be called after open_door();
  2251.  
  2252.        Return Value:  NONE
  2253.  
  2254.  
  2255.        Example:
  2256.                 #include "ckit.h"
  2257.                 main {
  2258.                         open_door();
  2259.                         debug_on();
  2260.                         .
  2261.                         .
  2262.                         .
  2263.                         close_door();
  2264.                      }
  2265.  
  2266.  
  2267.   CKIT based DOOR programs have many of the feature available for the
  2268. door author, and for the sysop using standard PCBoard keys such as:
  2269.  
  2270.              Function key
  2271.              ~~~~~~~~~~~~
  2272.                 F3              Toggle printer on/off
  2273.                 F4              Toggle pagebell on/off
  2274.                 F5              Shell to DOS
  2275.                 F7              Toggle caller alarm on/off
  2276.                 F8              Return user to system
  2277.                 F9              Toggle display on/off
  2278.  
  2279.              Alternate key
  2280.              ~~~~~~~~~~~~~
  2281.                ALT-N            Toggle sysop on next
  2282.                ALT-X            Toggle exit to dos after call
  2283.                ALT-H            Toggle between different status lines
  2284.                                 and help lines
  2285.         Alternately pressing the ALT-H key will bring up
  2286.         the next status line screen.  The 1st screen is a help screen,
  2287.         the second second screen shows your COM port status.
  2288.  
  2289.   Command stacking is also available and can be easily disabled if desired.
  2290. See the CKITDEMO.C for example of disabling command stacking.
  2291.  
  2292.  
  2293.                                   Files
  2294.                                  ~~~~~~~
  2295. CKIT.DOC     -  This file.
  2296.  
  2297. CKITDEMO.EXE - This is a very short written to test CKIT libraries
  2298.                and for a short demo.  CKITDEMO.EXE is a compiled program
  2299.                using the CKIT library.
  2300.  
  2301. CKIT.H     - This is a standard C header file, to be included with your
  2302.              door program.  This file contains all the function prototypes,
  2303.              and variable names and types available from CKIT.
  2304.  
  2305. CKIT_MS.LIB - This file is the CKIT library file to access all of the CKIT
  2306. CKIT_MM.LIB  files that are linked into your door program for MSC.
  2307.  
  2308. CKIT_TS.LIB - This file is the CKIT library file to access all of the CKIT
  2309. CKIT_TM.LIB  files that are linked into your door program for TURBO C.
  2310.  
  2311. CKITDEMO.C - The source code for CKITDEMO demostrating a door written
  2312.               using CKIT functions.
  2313.  
  2314. DEMO.BAT   - Sample .bat file to compile and link using the CKIT.LIB
  2315.              Provided as an example.
  2316.  
  2317. CKIT_TC.ZIP - Contains TURBO C files
  2318.  
  2319. TCREAD.ME  - Information for TURBO C users
  2320.  
  2321. CKITDEMO.MAK -  TURBO C Make file for CKITDEMO door (for use as example)
  2322.  
  2323. CKITS.PRJ    -  TURBO C Project file for CKITDEMO door (use as example)
  2324.  
  2325.  
  2326.  
  2327.    ATTENTION TURBO C USERS:  You must select WORD alignment when using
  2328.    functions from the TURBO librarys.  The default on BORLAND is BYTE
  2329.    alignment.  This will not work correctly.  See the file TCREAD.ME
  2330.    in the CKIT_TC.ZIP file.
  2331.  
  2332.    This package can be freely distributed so long as it is not modified
  2333.    or sold for profit.  If you find that this program is valuable,  you 
  2334.    can  send me a donation for what you think it is worth.   I  suggest 
  2335.    at least  $20.00.   You will receive a program CKITREG.EXE.  This
  2336.    will register all future copies of CKIT with your registration number.
  2337.    This means you would only have to download the new versions from your
  2338.    favorite board, saving you long distance charges!
  2339.  
  2340.    Send your contributions to:
  2341.  
  2342.       Rickie W. Belitz
  2343.       P.O. Box 5895
  2344.       Maryville, TN 37802-5895
  2345.  
  2346.                                  SUPPORT
  2347.                                ~~~~~~~~~~~
  2348.  
  2349.    If you have any questions, suggestions, or bug reports, contact me at:
  2350.  
  2351.        Data-Comp BBS
  2352.        (615) 982-8723  (HAYES ULTRA V.32)
  2353.        (615) 982-6537  (2400)
  2354.        (615) 970-7418  (HAYES V)    (private line)
  2355.  
  2356.         NOTE: The board has automatic rollover on the phone lines.
  2357.         There is chance you could end up on the 970 private line
  2358.         with limited time. (if not a registered user)
  2359.  
  2360.    I can also be reached via mail networks thru INTELEC's SHAREWARE conference
  2361.    and Relaynet's DOORS conference.
  2362.  
  2363.  
  2364.                                ACKNOWLEDGEMENTS
  2365.                              ~~~~~~~~~~~~~~~~~~~~
  2366.         I would like to give special thanks to my Co-sysop, Dean McGuire
  2367.         who has patiently tested the door routines and for help preparing the
  2368.         documentation.
  2369.  
  2370.  
  2371.                              COMPATIBILITY ISSUES
  2372.                           ~~~~~~~~~~~~~~~~~~~~~~~~~~
  2373.    Although CKIT makes a lot information available to the user, the author
  2374.  has to decide on what particular information his or her door will require.
  2375.  Here are some general guidelines that may help.  Decide on exactly what
  2376.  information your door will need to operate.  Keeping this to a minimum
  2377.  increases your chances of maintaining compatibility thruout the different
  2378.  BBS's systems and versions thereof which CKIT supports.
  2379.  
  2380.    For example, let's assume you are designing a standard BBS game.  CKIT
  2381.  handles all the detailed information such as time left etc.   All you would
  2382.  really need is some basic information.  Perhaps the user's name, city, and
  2383.  maybe expert on/off.  By keeping this type of information to the minimum,
  2384.  your door would work regardless of whether the sysop running your door used
  2385.  pcboard.sys or door.sys on the command line..i.e, game.exe c:\pcb\pcboard.sys
  2386.  OR game.exe c:\pcb\door.sys; either one would work.  (If the sysop was run-
  2387.  ning PCBoard 12.0, he would only be able to use pcboard.sys.  In any case,
  2388.  CKIT would not only take care of deciding if it was a pcboard.sys file or a
  2389.  door.sys file, but also if it *is* a pcboard.sys file, whether it is a 12.0
  2390.  sys file or later, and then would read it properly!)  This would make your
  2391.  door compatible with the full spectrum of PCBoard 12.0-14.5, GAP BBS and
  2392.  other systems using the standard door.sys file with minimum effort on the
  2393.  part of the sysop running your door.  Once you've written this fantastic
  2394.  new door, if it's a snap for a Sysop to install it, this might make him a
  2395.  bit more inclined to register it, right?
  2396.  
  2397.    Another senario would be if your door needs somewhat more than the basic
  2398.  information.  I would recommend using the variables available in door.sys
  2399.  in this case.  This would give you the broadest coverage for your door. If
  2400.  you will notice in the variables descriptions in this manual, there is a
  2401.  compatibility list to the right of each variable.  This tells you which and
  2402.  what type of information is available to you depending on whether your door
  2403.  is used with door.sys or pcboard.sys.  Below is a summary and quick guide to
  2404.  each pcboard.sys version and door.sys, and which information variables are
  2405.  available with each.
  2406.  
  2407.    If you need EVEN more information, then you can tell CKIT to open the
  2408. users file and read information.  Doing so, will limit your door to PCBoard
  2409. systems only.  CKIT will NOT record any information to the user's file.
  2410. It is a read only function.  You may also want to record new information
  2411. to the users file.   CKIT has the capability of doing so and if you
  2412. need this, contact me and we can work something out.  This is mainly for
  2413. safety reasons.
  2414.  
  2415.  
  2416.                        Compatible with...
  2417.                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2418.                        pcboard.sys   pcboard.sys   pcboard 14.5+
  2419.    Variable             12.0 only    14.0 - 14.5   and door.sys
  2420. ~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~   ~~~~~~~~~~~   ~~~~~~~~~~~~~
  2421.  *conferences                                           X
  2422.  aport                      X             X             X
  2423.  ansi_NG                                                X
  2424.  bps_open                                 X             X
  2425.  baud_rate                  X             X             X
  2426.  callalarm                  X             X
  2427.  current_conference         X             X             X
  2428.  caller_bday                                            X
  2429.  display                    X             X
  2430.  default_color                                          X
  2431.  daily_files                                            X
  2432.  download_Kbytes                                        X
  2433.  dload_total                              X             X
  2434.  error_connection           X             X             X
  2435.  expert                     X             X             X
  2436.  event_active                             X
  2437.  event_time                               X             X
  2438.  firstname                  X             X             X
  2439.  fullname                   X             X             X
  2440.  graphics                   X             X             X
  2441.  gen_dir                                                X
  2442.  local                      X             X             X
  2443.  language                   X             X
  2444.  last_file_scan             X             X             X
  2445.  min_left                   X             X             X
  2446.  main_dir                                               X
  2447.  max_files                                              X
  2448.  msgs_left                                              X
  2449.  netchat                    X             X
  2450.  node                                     X             X
  2451.  printer                    X             X
  2452.  pagebell                   X             X
  2453.  password                   X             X             X
  2454.  page_length                X             X             X
  2455.  PCB                        X             X             X
  2456.  PCB12                      X             X             X
  2457.  prev_used                                X
  2458.  port                       X             X             X
  2459.  parity                                                 X
  2460.  record_lock                                            X
  2461.  slide_event                              X
  2462.  sysop_next                 X             X
  2463.  sysop_name                                             X
  2464.  sysop_alias                                            X
  2465.  time_logged                X             X             X
  2466.  time_on                    X             X
  2467.  time_limit                 X             X
  2468.  time_added                 X             X
  2469.  total_doors                                            X
  2470.  user_record                X             X             X
  2471.  upload_Kbytes                                          X
  2472.  upload_total                             X             X
  2473.  
  2474.  One last note - There are two variables PCB12 and PCB.  When CKIT reads
  2475.  a pcboard.sys file, it will set the PCB variable TRUE.  If the pcboard.sys
  2476.  file it read was a 12.0 file, it will set the PCB12 variable true.  This
  2477.  may be useful in making adjustments to your program depending on which
  2478.  pcboard.sys file was read and/or if a sysop was running 12.0 and you
  2479.  normally expected door.sys.
  2480.  
  2481.  Also, see the users file information earlier in the doc file.
  2482.  Some of the users structure information is available even if you are just
  2483.  using door.sys.  IF you do tell CKIT to open the users file, all the users
  2484.  file information above will be available if CKIT finds a version 14.x
  2485.  pcboard.sys.  If it finds a pcboard 12.0 pcboard.sys file, some but not
  2486.  all of the users structure information will be available.
  2487.  Each member of the users scructure is marked to indicate what is available
  2488.  and what is not depending on the things just mentioned.
  2489.  
  2490.                                                                   Warranty
  2491.  
  2492.                                   Warranty
  2493.                                 ~~~~~~~~~~~~
  2494.        I make no warranty of any kind, express or implied, including
  2495.        without limitation, any warranties of merchantability and/or
  2496.        fitness for a particular purpose.  I shall not be held liable for
  2497.        any  damages, whether direct, indirect, special or consequential
  2498.        arising from a failure  of this program to operate in the manner
  2499.        desired by the user.  I shall not be held liable for any damage to
  2500.        data or property which may be caused directly or indirectly by the
  2501.        use of this program.
  2502.  
  2503.        In no event will I be held liable for any damages, including (but
  2504.        not limited to) any lost profits, lost savings or other incidental
  2505.        or consequential damages arising out of the use or inability to
  2506.        use this program, or for any claim by any other party.
  2507.  
  2508.        This warranty is governed by the laws of the State of Tennessee.
  2509.  
  2510.  
  2511.  
  2512.  
  2513.                                  RELEASE HISTORY
  2514.                                ~~~~~~~~~~~~~~~~~~~
  2515. 01-May-90 v1.0
  2516.    Initial BETA testing as CKIT10ß.ZIP
  2517.  
  2518.         Beta 1.0 release.  The next release of CKIT, I predict, should have
  2519.         about a 15% to 20% reduction in code size. If you find any problems
  2520.         with CKIT, please contact me at the phone numbers/address above.
  2521.  
  2522. 01-Jun-90 v1.0
  2523.     Release of version 1.0
  2524.  
  2525. 13-Jun-90 v1.0
  2526.     Release of version 1.0A
  2527.  
  2528.         Added library support for TURBO C. Added wait function.
  2529.     Minor documention fixes.
  2530.  
  2531. 16-Jun-90 v1.0
  2532.     Release of version 1.0B
  2533.  
  2534.         Fixed a minor error in the TURBOC small library.  I had
  2535.         left a INCLUDELIB in the code by mistake and you were
  2536.         forced to use the /N Tlink switch.  This has been corrected
  2537.         and the use of /n is no longer needed.
  2538.  
  2539. 20-Jun-90 v1.0
  2540.     Release of version 1.0C
  2541.  
  2542.         Fixed another minor problem where the assembler I used had
  2543.         converted all my functions to uppercase in the .obj file.
  2544.         I thought the default was to not do that but as it turns out
  2545.         it wasn't.  Now all the library function names/variables are
  2546.         the right case.
  2547.  
  2548.  
  2549. 25-Jun-90 v1.05
  2550.     Release of version 1.05
  2551.  
  2552.         Added support for 16550AN UART.  The code will take advantage
  2553.         of 16550AN chip if present.  Added caller log function.
  2554.         Begin including the medium library with Zip.  This was done
  2555.         because of the self-registering feature.  Took out time limit
  2556.         that CKIT originally had.  Future releases will not have any
  2557.         limitations.
  2558.  
  2559. 25-Jul-90 v1.1
  2560.     Release of version 1.1
  2561.         This release was a little premature.  I went ahead and released
  2562.         it since it did fix a couple of problems. * indicates a new
  2563.         feature.
  2564.  
  2565.         Display_file() -
  2566.         a. It will now put a space before the filename when it reports a
  2567.            problem.
  2568.         b. The EOF is no longer displayed.
  2569.         c. display_file() will now correctly display text files that have ANSI
  2570.            codes embedded in the file.
  2571.         d. CTRL-K now works on the local keyboard. (The remote keyboard was OK)
  2572.       * e. display_file() will now return TRUE/FALSE to indicate whether a
  2573.            problem had occured.  You can then check the C global variable
  2574.            _errno for cause of error.
  2575.       * f. Fixed problem when user.page_length was equal to 0.  See the
  2576.            CKIT.DOC for hints on how to take advantage of this feature.
  2577.  
  2578.     2. display_time() -  Would not update to the time used until after
  2579.                         two carriage returns were entered.  fixed
  2580.     3. input()
  2581.  
  2582.         a. Control characters or any non-displayable characters below 1F hex
  2583.            will not increase the counter.  This corrects the problem of being
  2584.            able to backspace too far and erasing the prompts.
  2585.       * b. Each call to input() now will purge the buffer into which you wish
  2586.            to place keyboard input.  You should no longer have to include the
  2587.            statement memset(buffer, 0, 21) before calling input().
  2588.       * c. A new function purge_buffer will purge any buffer to NULLS by
  2589.            passing a pointer to the buffer and the size of the buffer.
  2590.            i.e purge_buffer(buffer, 0x80).
  2591.            This may or may not be useful but is available.
  2592.  
  2593.          NOTE: There is a separate purge function for the serial port input
  2594.            buffer if you wish to purge it before calling input.
  2595.            See CKIT.DOC
  2596.  
  2597.       * d. New function available called check_keypress. Checks for any
  2598.            specific ASCII character.
  2599.            This function will return TRUE/FALSE as defined in CKIT.DOC.
  2600.  
  2601.       * e. Another new function called check_CR will check for a carriage
  2602.            return and return TRUE/FALSE.
  2603.  
  2604.  
  2605.     4. get_nextpar() - Would only accept 2 stacked commands, fixed.
  2606.  
  2607.     While working on the get_nextpar() function,  I went ahead and targeted
  2608.     it for some optimization along with the get_cmdline() function.
  2609.       The results are:
  2610.         get_nextpar() is now smaller and 7% faster.
  2611.         get_cmdline() is now smaller and 45% faster.
  2612.     Overall, with all the corrections and added functions the .obj file for
  2613.     CKIT is now 2% SMALLER than before.
  2614.  
  2615. 11-Aug-90 v1.5
  2616.     Release of version 1.5
  2617.         Ckit is now compatible with PCBoard version 12.0, 14.x-14.5, GAP
  2618.         BBS, and other BBS systems using the standard door.sys file.
  2619.         The level of compatiblity is up to the door author and the type
  2620.         of information needed.  There is a lot of information available,
  2621.         but by keeping this to a minimum, the door author can write his
  2622.         door to be compatible with all the systems above with no extra
  2623.         instructions to the user of the door except for the PCBoard
  2624.         sysop to use either pcboard.sys or door.sys.  (Version 12.0
  2625.         would have to use pcboard.sys and all others use door.sys.)
  2626.         CKIT will automatically determine which file to read and which
  2627.         PCBoard version is in use.  See the compatiblity section in this
  2628.         doc file for more information and a Variables Quick-Reference.
  2629.  
  2630.         Added more features and cosmetics to the program's status line
  2631.         for the sysop's use...
  2632.         F8      - Return user to BBS.  This was always there, I just
  2633.                   forgot to document it.  :)
  2634.         F5      - Shell to DOS
  2635.         ALT-X   - Sets the PCBoard's exit to DOS after caller flag
  2636.         ALT-N   - Sets the PCBoard's sysop on next after caller flag
  2637.         ALT-H   - Display Help Screen on sysop status line, and next
  2638.                   ALT-H will show com port status
  2639.  
  2640.         Functions added are:
  2641.  
  2642.         dos_shell(char *) - Allow door author to shell to another program
  2643.                               for execution if desired.  See CKIT.DOC
  2644.  
  2645.         _debug_on(void);  - Turns off keyboard timer and other things
  2646.                             while door author is debugging his door.
  2647.  
  2648.         Additional variables:
  2649.         short   PCB12, expert, parity, *conferences, current_conference,
  2650.                 caller_bday[8], main_dir[15], gen_dir[15], sysop_name[15],
  2651.                 sysop_alias[15], page_length, ansi_ng, default_color[2],
  2652.                 last_dir_scan[8], daily_files[4], total_doors[4],
  2653.                 msgs_left[4], max_files[4], upload_Kbytes[10],
  2654.                 download_Kbytes[10], dload_total[5], upload_total[5]
  2655.  
  2656.   -     Added my own math routine so you no longer have to include
  2657.         MATH.LIB if you are using TC compiler.
  2658.  
  2659.   -      Reduction of code size by about 20% relative.
  2660.  
  2661. 13-Aug-90 v1.5A
  2662.     Release of version 1.5A
  2663.         I can't believe I did this.  After telling everyone to make
  2664.         sure and not have debug_on in the released versions of their
  2665.         door,  I released CKIT with debug on!.  As a result, the
  2666.         keyboard timer and some other things would not work
  2667.         properly. This release with a code date 8/13/90 will work
  2668.         properly.
  2669.  
  2670.                             FUTURE ENHANCEMENTS
  2671.                           ~~~~~~~~~~~~~~~~~~~~~~~
  2672.  
  2673.         - The port addresses used in CKIT for COM1-COM4 use standard port
  2674.           addressing, 3F8, 2F8, 3E8 and 2E8.  The next release will enable
  2675.           a way of specifying a different port address and irq if needed.
  2676.  
  2677.         - Support of caller logging along with Goodbye from within door.
  2678.  
  2679.         - More PCBoard data files as 14.5 progresses
  2680.  
  2681.  
  2682.  
  2683.                                  ORDER.FRM
  2684.                                ~~~~~~~~~~~~~
  2685.  
  2686.                                    Return to:     Rickie Belitz
  2687.                                                   P.O. Box 5895
  2688.                                                   Maryville, TN 37802-5895
  2689.  
  2690.   Name ______________________________________________________________
  2691.  
  2692.   Company ___________________________________________________________
  2693.  
  2694.   Address ___________________________________________________________
  2695.  
  2696.           ___________________________________________________________
  2697.  
  2698.   Phone _____________________________________________________________
  2699.  
  2700.   Register CKIT to:  Name____________________________________________
  2701.  
  2702.   Diskette size:     ____ 5.25" acceptable       ____ 3.5" required
  2703.  
  2704.  
  2705.   Total enclosed:                                          __________
  2706.